The invention relates to circuits for measuring bi-directional currents across a current sense element, and more particularly to a simplified circuit for measuring bi-directional currents across a current sense element.
Current sense amplifiers, sometimes referred to as current shunt amplifiers, are typically used to measure the amount of current supplied by a power supply or battery to various types of electronic equipment, and also to measure the amount of current supplied by the electronic equipment back to the power supply. Several conventional approaches to the implementation of current sense amplifiers are known, including single polarity, low-side current sense amplifiers, low-side current sense amplifiers with bi-polar sensing, high-side switching current sense amplifiers, and bi-polar, high-side current sense amplifiers which detect the magnitude and polarity of current flowing from one device to another. These are disclosed in U.S. Pat. No. 5,498,984 entitled xe2x80x9cHigh Side, Current Sense Amplifier Using a Symmetric Amplifierxe2x80x9d issued Mar. 12, 1996 to Schaffer, which is believed to be the closest prior art.
FIG. 3 of the Schaffer patent shows a high-side current sense amplifier circuit in which a reference voltage VREF is connected to produce an offset voltage shift on the (xe2x88x92) input of the operational amplifier. This allows the amplitude and direction or polarity of the voltage drop across RSENSE for current flow through RSENSE in either direction to be indicated by means of a single voltage VOUT on a single output terminal. However, the current sense amplifier in FIG. 3 of the Schaffer patent requires that the operational amplifier be powered by the same supply voltage applied by the battery to the load. For example, if the battery output voltage is +12 volts, the +VDD supply voltage applied to the operational amplifier could not be +5 volts, because for most operational amplifiers it would not be permissible to apply a voltage greater than the +VDD supply voltage to the (xe2x88x92) input of the operational amplifier.
In FIG. 5 of the Schaffer patent, the disclosed bi-polar, high-side current sense amplifier has a symmetric architecture, and includes two sense inputs and two outputs. One output is active for positive input signals corresponding to current flowing from a battery through the sense resistor to a load. The other output is active for negative input signals corresponding to current flow in an opposite direction through the sense resistor. The two outputs are logically ORed to provide only one of the two outputs at a time. The operational amplifiers are powered by the same VCC voltage applied on conductor 54 to the load 46. The VCC voltage does not have to be equal to the battery voltage, because the input stages of the operational amplifiers 48 and 49 are constructed so that the common mode input voltage can exceed the VCC voltage. The circuit described in the Schaffer patent requires two output terminals, one for indicating the magnitude of the current through the current sense resistor and the other for indicating the direction of current in the current sense resistor.
An important shortcoming of the circuit disclosed in FIG. 5 of the Schaffer patent is that it is very inaccurate for very low currents through sense resistor 42. This is because for such very low currents, the voltage differential across sense resistor 42 is so small that the current flowing through either resistor RS1 and transistor Q1 or resistor RS2 and transistor Q2 is also very small, and that causes the feedback from the output 58 to the (+) input of the associated operational amplifier 48 or 49 to be very low. The low or reduced feedback results in low loop gain, and prevents the operational amplifier 48 or 49 from accurately producing the signal IOUT in conductor 58 if the current through the sense resistor 42 is very small. For example, if transistor Q2 in FIG. 5 of the Schaffer is on, but the shunt current through sense resistor 42 is nearly zero, then feedback causes the output of operational amplifier 49 to attempt to go all the way to ground in order to turn off transistor Q2. However, as a practical matter, operational amplifier 49 is incapable of driving its output all the way to ground. By turning transistor Q2 nearly off, the normal low-impedance feedback loop from the output 58 to the (+) input of operational amplifier 49 becomes a slow, high-impedance feedback loop. That is what results in a dramatic increase of the amount of error in the value of IOUT representing the magnitude of the very low (nearly zero) shunt current through sense resistor 42.
Furthermore, if the current flowing between battery 44 and load 46 is very small, the voltage across sense resistor 42 may be significantly lower than the algebraic sum of the offset voltages of operational amplifiers 48 and 49. For that reason, and also for the reason that the amplifier 18 is very inaccurate for low sense resistor currents, the determination of the direction of the sense resistor current by operational amplifier 56 is very uncertain over a considerable range of low currents through sense resistor 42.
Thus, for low sense currents, the circuit disclosed in the Schaffer patent is incapable of accurately determining either the magnitude or the direction of the current flowing through the sense resistor.
Furthermore, the circuit described in the Schaffer patent requires use of two operational amplifiers and a comparator, and therefore is more complex and costly and dissipates more power than desirable.
Thus, there has been a long-standing unmet need for an improved, less costly, more accurate current sense amplifier which (1) provides a high degree of accuracy in measurement of the magnitude of the current flowing through a current shunt element and also provides a high degree of certainty of the direction of the current, and (2) also provides a single signal which accurately represents both the amplitude and polarity or direction of a current flowing through the current shunt element.
Accordingly, it is an object of the invention to provide a current sense amplifier which is more accurate and less expensive than the closest prior art, and provides a single output signal indicative of both amplitude and direction of current through the sense resistor or the like.
It is another object of the invention to provide a high-side current sense amplifier which is more accurate and less expensive than the closest prior art, and provides a single output signal indicative of both amplitude and direction of current through the sense resistor or the like.
It is another object of the invention to provide a technique for using a current sense amplifier and an analog-to-digital converter in such a way as to avoid the effect of drift of a reference voltage on a reference-dependent offset voltage component of an output of the current sense amplifier.
It is another object of the invention to provide a current sense amplifier which is especially useful in providing a single analog output signal to an analog-to-digital converter to enable it to produce a digital output signal accurately representing both magnitude and direction of current flowing through a current shunt element.
It is another object of the invention to provide a current sense amplifier which is especially useful in measuring the amount of current in a feedback loop and providing a digital signal useful for controlling the feedback loop.
Briefly described, and in accordance with one embodiment, the invention provides a current sense amplifier (10) for measuring current flowing through a sense resistor (12) coupled between first (11) and second (13) terminals, respectively, of the current sense amplifier. The current sense amplifier includes a first amplifier (18) having a first input (17) coupled by a first resistor (16) to the first terminal (11) and a second input (20) coupled by a second resistor (19) to the second terminal (13). A current source circuit (23) is coupled to the first input (17) of the first amplifier to cause a bias current to flow through the first resistor (16). A feedback circuit (26) is coupled to the output (22) of the first amplifier and the second input (20) of the first amplifier to cause a feedback current to flow through the second resistor (19) to equalize the voltages on the first (17) and second (20) inputs of the first amplifier and also to supply the feedback current to an output terminal (36) of the current sense amplifier (10).
In the described embodiment, the first terminal (11) is coupled to an electronic/electrical load device or electronically/electrically controlled load device (15) and the second terminal (13) is coupled to a voltage source (14) or battery which supplies the current through the sense resistor (12) to the load device (15). The feedback circuit includes a first transistor (26) having a control electrode coupled to the output of the first amplifier (18), a first electrode coupled to the second input (20), and a second electrode coupled to the output terminal (36). The first transistor supplies the feedback current through the output terminal (36) into an output resistor (40) having a first terminal connected to the output terminal (36) and a second terminal connected to the first reference voltage conductor (9) to produce an output voltage (VOUT) on the output terminal (36). The current source circuit 23 can include a second amplifier (30) having a first terminal coupled to a reference voltage (VREF), an output (28) coupled a control electrode of a second transistor (24), a first electrode coupled to the first input (17) of the first amplifier (18), and a second electrode coupled to a second input of the second amplifier (30) and to a current setting resistor (38).
The output terminal (36) can be connected to a first input of an analog-to-digital converter (42) having an output for conducting a single digital output signal representative of the amplitude and direction of the current flowing through the sense resistor (12). A second input of the analog-to-digital converter can be connected to the reference voltage. A battery charger (46) can be coupled to the first terminal (11) to produce a charging current flowing through the current sense resistor (12) in the direction opposite to the flow of current supplied by the voltage source to the load device (15).